package com.atguigu.gmallre.mock.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.apache.commons.beanutils.BeanUtils;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 活动表
 * </p>
 *
 * @author zhangchen
 * @since 2020-02-25
 */
@Data
public class ActivityInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 活动id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 活动名称
     */
    private String activityName;

    /**
     * 活动类型
     */
    private String activityType;

    /**
     * 活动描述
     */
    private String activityDesc;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 创建时间
     */
    private Date createTime;


    /**
     * 修改时间
     */
    private Date operateTime;

    @TableField(exist = false)
    private List<ActivityRule> activityRuleList= new ArrayList<>();

    @TableField(exist = false)
    private List<ActivitySku> activitySkuList= new ArrayList<>();




    public static void main(String[] args) {
        ActivityInfo activityInfo = new ActivityInfo();


        try {
            BeanUtils.setProperty(activityInfo, "operateTime",new Date());
        } catch (Exception e) {

        }

        System.out.println(activityInfo);

    }
}
